<table border="1" class="programme">
	<thead>
		<tr>
			<th></th>
	<?php
	foreach($programmation['jours'] as $jour => $progJour){
		$cssToday=$progJour['today']?'class="today"':'';
		$label=$progJour['label'];
		$court=$progJour['court'];
		echo("<td $cssToday>$court<div style='display:none'>$label</div></td>".PHP_EOL);
	}
	?>
		</tr>
	</thead>
	<tbody>
	<?php if(count($programmation['films'])==0): ?>
		<tr>
			<th>Aucun film programmé cette semaine</th>
		</tr>
	<?php else: ?>
	<?php foreach($programmation['films'] as $filmId => $progFilm){ ?>
		<?php $film=(Film::load($filmId)); ?>
		<tr>
			<th><a href="fiche.php?film=<?= $film->FILM_NUMID ?>">
                <img src="<?= $film->FILM_AFFIC ?>" title="<?= $film ?>" height="150px"/>
            </a></th>
			<?php for($noJour=0;$noJour<7;$noJour++){ ?>
				<td<?= $programmation['jours'][$noJour]['ferme']?' class="ferme"':' class="ouvert"' ?>>
				<?php foreach($progFilm[$noJour] as $heure){ ?>
					<div><?= Date::formaterDuree($heure) ?></div>
				<?php }?>
				</td>
			<?php }?>
		</tr>
	<?php } ?>
	<?php endif; ?>
	</tbody>
</table>
<form method="post">
    <button name="action" value="pdf">Version PDF</button>
</form>